<template>
	<div id="gallery" class="max" v-if="show">
		<div class="back" @click="show = false">
			x
		</div>
		<span class="weui-gallery__img flex">
			<img :src="html.url" alt="" width="100%" v-if="html.type=='image'">
			<video :src="html.url" width="100%" v-else autoplay controls></video>
		</span>
		
	</div>
</template>

<script>
	export default {
		props: {
			html: {
				type: String,
				default: ''
			},
			show: Boolean
		},
		methods: {
			del() {
				// console.log(this)
			}
		}
	};
</script>

<style>
	#gallery {
		position: absolute;
		height: 100%;
		weight: 100%;
		top: 0;
		left: 0;
		background: #000;
		z-index: 999999;
	}
	#gallery .back{
		position: absolute;
		top:1rem;
		right: 1rem;
		font-size: 4rem;
		color: #ECECEC;
		z-index: 100;
	}
</style>
